<meta charset="utf-8">
<script>
       var danci=prompt("请您要查询的单词");

 
       if(danci=="dog"){
           document.write("狗");}
       else   if(danci=="cat"){
           document.write("猫");}
      else   if(danci=="pig"){
           document.write("猪");}
       else{ 
            document.write("没有");
        }

</script>